package com.project.controller;

import com.project.bean.PieBean;
import com.project.service.IPieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.List;

@RestController
@RequestMapping("pie")
public class PieController {
    @Autowired
    private IPieService pieService;

    @RequestMapping("findA")
    public List<PieBean> findSellTypeCount(LocalDate startDate, LocalDate endDate) {
        return pieService.findSellTypeCount(startDate, endDate);
    }

    @RequestMapping("findB")
    public List<PieBean> findSellBrandTypeCount(LocalDate startDate, LocalDate endDate) {
        return  pieService.findSellBrandTypeCount(startDate, endDate);
    }


}
